/***************************************************
Class: GlobalFunctions
Includes: d3dx9.h
Editors: Gindi
Existing Issues: None
Description: Global functions used throughout the application.
***************************************************/
#include <d3dx9.h>

//static float degToRad(float deg) {
//	return deg*(D3DX_PI/180.0f);
//}
//
//static float radToDeg(float rad) {
//	return rad*(180.0f/D3DX_PI);
//}

static float calDist(D3DXVECTOR3* p1, D3DXVECTOR3* p2) {
	float dist = pow((p1->x - p2->x),2) + pow((p1->y - p2->y),2) 
		+ pow((p1->z - p2->z),2);
	dist = pow(dist,0.5f); // instead of sqrt(), use pow(x,0.5) to save CPU resources

	return dist;
}
